<div class="row">

    <div class="col-md-12">      		
    	
    	<div class="widget stacked ">
    		<div class="widget-header">
                <i class="icon-list"></i>
                <h3><?php echo isset($title_for_layout)?$title_for_layout:$this->l('Patient profile'); ?></h3>
            </div> <!-- /.widget-header -->

            <div class="widget-content">
            	<div class="form-group">
                        <span class="col-md-8">
                            <a href="<?php echo site_url('User/MyAccount/update'); ?>" class="btn btn-primary"><span class="glyphicon glyphicon-edit"></span> <?php echo $this->l('Edit your profile'); ?></a>
                            <a href="<?php echo site_url('User/AccountService/passwordRecovery'); ?>" class="btn btn-default"><span class="glyphicon glyphicon-"></span> <?php echo $this->l('Retreives your password'); ?></a>
                        </span>
                    </div>
                <div class="clearfix"></div>
            	<section id="tables">
                    <div class="page-header">
                        <h3><?php echo $title; ?></h3>
                    </div>
	            	<div class="col-md-4">
						<dl class="dl-horizontal">
						  <dt><?php echo $this->l('Username'); $this->l('Username'); ?></dt><dd><?php echo $user->username; ?></dd>
						  <dt><?php echo $this->l('Name and firstname'); ?></dt><dd><?php echo $user->firstname.' '.$user->lastname; ?></dd>
						  <dt><?php echo $this->l('Email'); ?></dt><dd><?php echo $user->email; ?></dd>
						  <dt><?php echo $this->l('Status'); ?></dt><dd><?php echo ($user->activated == '0') ? $this->l('Not confirmed') : ( ($user->activated == '2') ? $this->l('Activated') : $this->l('Confirmed') ); ?></dd>
						  <dt><?php echo $this->l('Last connexion'); ?></dt><dd><?php echo ($user->last_connexion == NULL) ? $this->l('Never') : /*format_date('d F Y', strtotime($user->last_connexion))*/$user->last_connexion; ?></dd>
						<?php 
							if (isset($patient) AND $patient != NULL){
						?>
							  <dt><?php echo $this->l('Patient birthday'); ?></dt><dd><?php echo /*format_date('d F Y', strtotime($patient->birthday))*/$patient->birthday; ?></dd>
							  <dt><?php echo $this->l('Phone'); ?></dt><dd><?php echo $patient->phone; ?></dd>
							  <dt><?php echo $this->l('Profession'); ?></dt><dd><?php echo $patient->profession; ?></dd>
							  <dt><?php echo $this->l('P.O.Box'); ?></dt><dd><?php echo $patient->pobox; ?></dd>
							  <dt><?php echo $this->l('Town'); ?></dt><dd><?php echo $patient->town; ?></dd>
							  <dt><?php echo $this->l('Address'); ?></dt><dd><?php echo $patient->address; ?></dd>
							  <dt><?php echo $this->l('Social security number'); ?></dt><dd><?php echo $patient->nb_secur_social; ?></dd>
							  <dt><?php echo  $this->l('CMU'); ?></dt><dd><?php echo ($patient->cmu == '0') ? $this->l('No') : $this->l('Yes'); ?></dd>
						<?php } elseif (isset($doctor) and $doctor != NULL) { ?>
							<dt><?php echo $this->l('Medical Id'); ?></dt><dd><?php echo /*format_date('d F Y', strtotime($patient->birthday))*/$doctor->medical_id; ?></dd>
							  <dt><?php echo $this->l('Phone'); ?></dt><dd><?php echo $doctor->phone; ?></dd>
							  <dt><?php echo $this->l('Profession'); ?></dt><dd><?php echo $doctor->profession; ?></dd>
							  <dt><?php echo $this->l('Address'); ?></dt><dd><?php echo $doctor->address; ?></dd>
                                                          <dt><?php echo $this->l('Description'); ?></dt><dd><?php echo $doctor->description; ?></dd>
						<?php } ?>
						</dl>
					</div>
				</section>	
    		</div> <!-- /widget-content -->
    			
    	</div> <!-- /widget -->
    	
    </div> <!-- /span12 -->

</div> <!-- /row -->
